<?php 
	namespace Driver\Cache;
	use Memcache as Memcache;
	/**
	* IMemcache 缓存驱动层 IMemcache 负责提供数据缓存
	*/
	class IMemcache
	{
		protected static $memInstance = null;

		function __construct()
		{
			
		}

		public static function getInstance()
		{
			if(self::$memInstance === null)
			{
				self::$memInstance = new Memcache();
				self::$memInstance->addServer('127.0.0.1', 11211);
				self::$memInstance->connect('127.0.0.1', 11211);
			}
			return self::$memInstance;
		}
		function __clone(){
			trigger_error('不能被克隆', E_USER_NOTICE);
		}
	}
 ?>